package com.cskaoyan.controller;

import com.cskaoyan.service.DashboardService;
import com.cskaoyan.vo.BaseRespVo;
import com.cskaoyan.vo.DashboardDataVO;
import org.apache.shiro.authz.annotation.RequiresRoles;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("admin")
public class DashboardController {


    @Autowired
    DashboardService service;

    @GetMapping("dashboard")
    public BaseRespVo dashboard() {
        DashboardDataVO data = service.getData();
        return BaseRespVo.ok(data);
    }

}
